<?php 
$temp = 0;
$name = "";
$birthday = "";
$place_of_birth = "";
$address = "";
$phone1 = "";
$phone2 = "";
$email1 = "";
$email2 = "";
$website = "";
foreach ($query->result() as $res):
		
	if($res->id_member!=""){
		if($temp=='#eee'){
	 		$bg='#ccc';
			$bgcount = '#FFEE79';
	 		$temp = 1;
	 	} else {
	 		$bg='#eee';
			$bgcount = '#FFFABB';
	 		$temp = 0;
		}
	}
		
		$que = $this->db->query("select * from contact_member where member='$res->id_member' limit 1");
		foreach ($que->result() as $row):
				$address = $row->address;
				$phone1 = $row->phone1;
				$phone2 = "/ ".$row->phone2;
				$email1 = $row->email1;
				$email2 = "/ ".$row->email2;
				$website = $row->website;
		endforeach;
		
		$q = $this->db->query("select * from info_member where member='$res->id_member' limit 1");
		foreach ($q->result() as $re):
				$name = $re->name;
				$birthday = $re->birthday;
				$place_of_birth = $re->place_of_birth;
				$gender = $re->gender;
		endforeach;
	
	if($res->images_large=="" || $res->images_large==NULL){
		$images = site_url("images/noimages.jpg");
	} else {
		$images = site_url(array('just4u','ImagesSmall','member',$res->id_member));
	}
	
//	$res->description = word_limiter($res->description,40);
	
?>
<tr bgcolor="<?php echo $bg?>" align="left" class="draw" valign="top">
      <td class="marginContent"><b><?php echo $res->username ?></b></td>
      <td class="marginContent"><?php echo "<b>".$name."</b><br><em>(".$res->type." - ".$res->status.")<br>".$gender."</em>" ?></td>
      <td class="marginContent"><img class="images" src="<?php echo $images ?>" /></td>
      <td class="marginContent"><?php echo "<b>Phone : </b>".$phone1." ".$phone2."<br>"."<b>E-mail : </b>".$email1." ".$email2."<br>"."<b>Website : </b><a href='$website' target='_new'>".$website."</a><br>"."<b>Address : </b>".$address ?></td>
      <td class="marginContent"><?php echo "<b>".$place_of_birth."</b><br>".$birthday ?></td>
      <td class="marginContent">
      	<a class="uiButtonRounded" href="<?php echo site_url(array('just4u','member_edit',$res->id_member))?>">Edit</a>
      	<a class="uiButtonRounded" href="javascript: delete_member('<?php echo $res->id_member?>')">Delete</a>
      </td>
</tr>
<?php 
endforeach;
?>

